﻿@model MvcAtletIS.Models.Contacts

@{
    ViewBag.Title = "Kontakty";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Pridať nový kontakt</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Detaily</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Surname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Surname)
            @Html.ValidationMessageFor(model => model.Surname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Firstname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Firstname)
            @Html.ValidationMessageFor(model => model.Firstname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Position)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Position)
            @Html.ValidationMessageFor(model => model.Position)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.ClubId, "Klub")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ClubId", "Vyberte klub")
            @Html.ValidationMessageFor(model => model.ClubId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.City)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.City)
            @Html.ValidationMessageFor(model => model.City)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Adress)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Adress)
            @Html.ValidationMessageFor(model => model.Adress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Phone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Phone)
            @Html.ValidationMessageFor(model => model.Phone)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Other)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Other)
            @Html.ValidationMessageFor(model => model.Other)
        </div>

        <p>
            <input type="submit" value="Pridať" />
        </p>

    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na prehľad kontaktov", "Index")
</div>
